import fetch from 'common/src/utils/fetch'
import UTILS from "common/src/utils/utils";
function getStudentList(data){//开关设置列表
    return fetch ({
        url:`/api/scoremanagementservice/scoreRankController/queryScoreRankPage`,
        method:'post',
        data
       
    })
}
function exportList(data){//按比例导出
    return fetch ({
        url:`/api/scoremanagementservice/scoreRankController/exportScoreByRankPercent`,
        method:'post',
        data,
    })
}
function downLoadStuents(data){//导出
    return fetch ({
        url:`/api/scoremanagementservice/scoreRankController/exportScoreRank`,
        method:'post',
        data,
        responseType: 'blob'
    }).then(res => {
        UTILS.downloadFile(res, data.name, 'application/vnd.ms-excel;charset=utf-8');
    });
}
function downStatus(key){
    return fetch({
        url: '/api/scoremanagementservice/scoreRankController/exportScoreByRankPercentByKey?key=' + key,
        method: 'get'
    });
}
function getStudentType() {
    return fetch({
        url:'/api/scoremanagementservice/scoreRankController/queryStudentTypeEnum',
        method:'get'
    })
}
export default{
    getStudentList,
    exportList,
    downLoadStuents,
    downStatus,
    getStudentType
}